import type { FormRules } from 'naive-ui'

export const addSwiperRules = (): FormRules => ({
    fileList: [
        {
            required: true,
            type: 'array',
            message: '请填上传图片',
            trigger: ['change']
        }
    ],
    name: [
        {
            required: true,
            message: '请填写轮播图名称',
            trigger: ['input', 'blur']
        }
    ],
    position: [
        {
            required: true,
            message: '请选择轮播图位置',
            trigger: ['change']
        }
    ],
    content: [
        {
            required: false,
            message: '请填写轮播图内容',
            trigger: ['change']
        }
    ],
    jumpUrl: [
        {
            required: false,
            message: '请填写跳转链接',
            trigger: ['change']
        }
    ],
    seqno: [
        {
            required: true,
            type: 'number',
            message: '请选择轮播图顺序',
            trigger: ['input', 'blur']
        }
    ]
})
